
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>忧郁小王子-后台管理首页</title>
  <link rel="stylesheet" href="/admin/assets/vendors/bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="/admin/assets/vendors/font-awesome/css/font-awesome.css">
  <link rel="stylesheet" href="/admin/assets/vendors/nprogress/nprogress.css">
  <link rel="stylesheet" href="/admin/assets/css/admin.css">
  <script src="/admin/assets/vendors/nprogress/nprogress.js"></script>
  <style>
    .center{
        text-align: center;
    }
  </style>
</head>
<body>
  <script>NProgress.start()</script>

  <div class="main">
    {{include '../common/header.html'}}
    <div class="container-fluid">
      <div class="jumbotron text-center">
        <table class="table table-bordered">
          <caption class="h3">网站信息统计</caption>
          <thead>
          <tr>
            <th class="center h4">管理员</th>
            <th class="center h4">用户</th>
            <th class="center h4">文章</th>
            <th class="center h4">文章分类</th>
            <th class="center h4">评论</th>
            <th class="center h4">留言</th>
          </tr>
          </thead>
          <tbody>
          <tr>
            <td>{{admin}}&nbsp;个</td>
            <td>{{user}}&nbsp;个</td>
            <td>{{a}}&nbsp;篇</td>
            <td>{{category}}&nbsp;类</td>
            <td>{{b}}&nbsp;条</td>
            <td>{{c}}&nbsp;条</td>
          </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>

  {{include '../common/leftMenu.html'}}

  <script src="/admin/assets/vendors/jquery/jquery.js"></script>
  <script src="/admin/assets/vendors/bootstrap/js/bootstrap.js"></script>
  <script>NProgress.done()</script>
  <script>
    $('#logout').on('click',function (){
      let logout = confirm('你确定要退出吗？');
      if (logout){
        $.ajax({
          type: 'get',
          url: '/logout',
          success: function (data){
            location.href = '/';
          },
          error: function (){
            alert('退出失败！！！');
          }
        })
      }
    })
  </script>
</body>
</html>
